# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
MEDIA_ROOT = PROJECT_PATH + '\\media\\'
PATH_TO_BASED_ICON = MEDIA_ROOT + 'basedIcons\\'
PATH_TO_COLORED_ICON = MEDIA_ROOT + 'colored\\'
PATH_TO_IMAGE = MEDIA_ROOT + 'image\\'
PATH_TO_CSS = MEDIA_ROOT + 'css\\'
PATH_TO_BOOTSTRAP = BASE_DIR + '\\static\\bootstrap-3.1.1-dist'


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'mst@vg3-g4q$&zf@wg@t&5(=)*u_+(@c+=t*zw!vqzbjcw))i2'
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
#     'django.template.loaders.eggs.Loader',
)

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'iconsite.urls'
WSGI_APPLICATION = 'iconsite.wsgi.application'


########### FRO MY SQL #############
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
#DATABASES = {
#    'default': {
#        'ENGINE': 'django.db.backends.mysql',
#        'HOST'  : '127.0.0.1',
#        'PORT'  : '',
#        'NAME': 'iconmaker',
#        'USER': 'admin',
#        'PASSWORD': 'Exile123',
#    }
#}

########### FRO PostgreSQL #############
DATABASES = {
    'default'   :   {
        'ENGINE'    :   'django.db.backends.postgresql_psycopg2',   # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME'      :   'iconmaker',                                      # Or path to database file if using sqlite3.
        'USER'      :   'postgres',                                 # Not used with sqlite3.
        'PASSWORD'  :   '123',                                # Not used with sqlite3.
        'HOST'      :   '127.0.0.1',                            # Set to empty string for localhost. Not used with sqlite3.
        'PORT'      :   '',                                         # Set to empty string for default. Not used with sqlite3.
    }
}

TEMPLATE_DIRS = (
    MEDIA_ROOT + 'html',
)

STATIC_URL = '/static/'
STATICFILES_DIRS = (
    PATH_TO_BASED_ICON,
    PATH_TO_COLORED_ICON,
    PATH_TO_IMAGE,
    PATH_TO_CSS,
    PATH_TO_BOOTSTRAP,
)



# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/

STATIC_URL = '/static/'

SESSION_EXPIRE_AT_BROWSER_CLOSE = True
